<div class="content-section introduction " >
  <div>
    <span class="feature-title">定位管理 | <small>定位配置</small> </span>
  </div>
</div>
<div class="content-section implementation GridDemo clearfixes">
  <div class="mysearch">
    <ng-container *ngFor="let tab of tabs;let i = index">
      <button pButton type="button"  label="{{tab.label}}" (click)="changeTab(i)"></button>
    </ng-container>
  </div>
  <ng-container [ngSwitch]= tabIndex>
    <div class="contentInfo" *ngSwitchCase="0" >
      <form class="form-horizontal storage">

        <p-panel >
          <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">

            <div class="ui-grid-row margin-bottom-1vw">
              <div class="ui-grid-col-1 ui-padding-10px text-right">
                <label >基站id:</label>
              </div>
              <div class="ui-grid-col-1">
                <input name="cid"   type="text" pInputText>
              </div>
              <div class="ui-grid-col-1 ui-padding-10px text-right">
                <label >基站通信地址:</label>
              </div>
              <div class="ui-grid-col-1">
                <input  name="addr"   type="text" pInputText>
              </div>
              <div class="ui-grid-col-1 ui-padding-10px text-right">
                <label >状态:</label>
              </div>
              <div class="ui-grid-col-1">
                <p-dropdown [options]="cities" [(ngModel)]="queryModel.condition.status" name="city"></p-dropdown>
              </div>
              <div class="ui-grid-col-1 ui-padding-10px text-right">
                <label >所在区域:</label>
              </div>
              <div class="ui-grid-col-1">
                <input  name="area"   type="text" pInputText>
              </div>
              <div class="ui-grid-col-1 ui-padding-10px text-right">
                <label >x坐标:</label>
              </div>
              <div class="ui-grid-col-1">
                <input name="xCoor"   type="text" pInputText>
              </div>
              <div class="ui-grid-col-1 ui-padding-10px text-right">
                <label >y坐标:</label>
              </div>
              <div class="ui-grid-col-1">
                <input  name="yCoor"   type="text" pInputText>
              </div>
            </div>

          </div>
          <p-footer>
            <div class="ui-helper-clearfix">
              <span class="ui-panel-title" style="font-size:16px;display:inline-block;margin-top:2px"></span>
              <button class="save"  pButton type="button"  label="查询" (click)="goBack()"  > </button>
              <button class="save"  pButton type="submit" label="添加" (click)="showBaseEdit()"   ></button>
              <button class="save" pButton type="submit" (click)="formSave()" label="删除"  ></button>
              <button class="save" pButton type="submit" (click)="formSave()" label="导入模板下载"  ></button>
              <button class="save" pButton type="submit" (click)="formSave()" label="批量导入"  ></button>
              <button class="save" pButton type="submit" (click)="showBaseGroup()" label="基站分组"  ></button>
            </div>
          </p-footer>
        </p-panel>

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-2">
          </div>
        </div>
        <!--<label>设备列表</label>-->

        <p-dataTable [value]="inspections"  [lazy]="true" [rows]="10" [paginator]="true"
                     [totalRecords]="totalRecords"  [(selection)]="selectInsepections" >
          <!--<p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>-->
          <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
          <ng-template pTemplate="emptymessage">
            当前没有数据
          </ng-template>
        </p-dataTable>

      </form>
    </div>
    <div class="associatedEquipment" *ngSwitchCase="1" >
      <div class="ui-grid-row">
        <div class="ui-grid-col-2">
          <p-tree [value]="rooms" [(selection)]="selected" [contextMenu]="cm"></p-tree>
          <p-contextMenu #cm [model]="items"></p-contextMenu>
        </div>
        <div class="ui-grid-col-10">
          <div class="mysearch">
            <form>
              <div class="ui-g">
                <div class="ui-g-4 ui-sm-12">
                  <label class="ui-g-2 ui-sm-5 text-right">分组编码:</label>
                  <div class="ui-g-4  ui-sm-7 ui-fluid">
                    <input pInputText type="text" name="sid" placeholder="入库单号" [(ngModel)]="queryModel.condition.sid" />
                  </div>
                  <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">基站1id:</label>
                  <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
                    <input  pInputText type="text" name="status" placeholder="经手人"  [(ngModel)]="queryModel.condition.creator" />
                  </div>
                </div>

                <div class="ui-g-4 ui-sm-12">
                  <label class="ui-g-2 ui-sm-5 text-right">基站1ip:</label>
                  <div class="ui-g-4  ui-sm-7 ui-fluid">
                    <input pInputText type="text" name="sid" placeholder="入库单号" [(ngModel)]="queryModel.condition.sid" />
                  </div>
                  <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">基站2id:</label>
                  <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
                    <input  pInputText type="text" name="status" placeholder="经手人"  [(ngModel)]="queryModel.condition.creator" />
                  </div>
                </div>

                <div class="ui-g-4 ui-sm-12">
                  <label class="ui-g-2 ui-sm-5 text-right">基站1ip:</label>
                  <div class="ui-g-4  ui-sm-7 ui-fluid">
                    <input pInputText type="text" name="sid" placeholder="入库单号" [(ngModel)]="queryModel.condition.sid" />
                  </div>
                  <!--<div class="ui-g-6 ui-sm-12 option">
                    <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
                    <button pButton  label="添加" ngClass="ui-sm-12"  (click)="clearSearch()"></button>
                    <button pButton  label="删除" ngClass="ui-sm-12"  (click)="clearSearch()"></button>
                  </div>-->
                </div>

                <div class="ui-g-12 ui-sm-12">
                  <div class="ui-g-6 ui-sm-12 option">
                    <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
                    <button pButton  label="添加" ngClass="ui-sm-12"  (click)="showRoomstationsEdit()"></button>
                    <button pButton  label="删除" ngClass="ui-sm-12"  (click)="clearSearch()"></button>
                  </div>
                </div>

              </div>
            </form>
          </div>
          <p-dataTable [value]="baseGroups">
            <p-column selectionMode="multiple"></p-column>
            <p-column field="one" header="分组编码"></p-column>
            <p-column field="two" header="基站1id"></p-column>
            <p-column field="three" header="基站1通信地址"></p-column>
            <p-column field="four" header="基站2id"></p-column>
            <p-column field="five" header="基站2通信地址"></p-column>
            <p-column styleClass="col-button" header="操作">
              <ng-template let-car="rowData" pTemplate="body">
                <button type="button" pButton label="修改"></button>
              </ng-template>
            </p-column>
            <ng-template pTemplate="emptymessage">
              当前没有数据
            </ng-template>
          </p-dataTable>
        </div>
      </div>
    </div>
    <div class="Operationlog" *ngSwitchCase="2">
      <div class="mysearch">
        <form>
          <div class="ui-g">
            <div class="ui-g-4 ui-sm-12">
              <label class="ui-g-2 ui-sm-5 text-right">标签id:</label>
              <div class="ui-g-4  ui-sm-7 ui-fluid">
                <input pInputText type="text" name="sid" placeholder="入库单号" [(ngModel)]="queryModel.condition.sid" />
              </div>
              <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">备注:</label>
              <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
                <input  pInputText type="text" name="status" placeholder="经手人"  [(ngModel)]="queryModel.condition.creator" />
              </div>
            </div>

            <div class="ui-g-4 ui-sm-12">
              <label class="ui-g-2 ui-sm-5 text-right">状态:</label>
              <div class="ui-g-4  ui-sm-7 ui-fluid">
                <p-dropdown [options]="cities" [(ngModel)]="queryModel.condition.status"></p-dropdown>
              </div>
              <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">所在区域:</label>
              <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
                <p-tree [value]="rooms" [(selection)]="selected" [contextMenu]="cm"></p-tree>
              </div>
            </div>

            <div class="ui-g-12 ui-sm-12">
              <div class="ui-g-6 ui-sm-12 option">
                <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
                <button pButton  label="添加" ngClass="ui-sm-12"  (click)="showRoomstationsEdit()"></button>
                <button pButton  label="删除" ngClass="ui-sm-12"  (click)="clearSearch()"></button>
              </div>
            </div>

          </div>
        </form>
      </div>
      <p-dataTable [value]="tags">
        <p-column selectionMode="multiple"></p-column>
        <p-column field="one" header="标签id"></p-column>
        <p-column field="two" header="备注"></p-column>
        <p-column field="three" header="状态"></p-column>
        <p-column field="four" header="所在区域"></p-column>
        <p-column field="five" header="x轴坐标"></p-column>
        <p-column field="six" header="y轴坐标"></p-column>
        <p-column field="seven" header="定位基站组"></p-column>
        <p-column styleClass="col-button" header="操作">
          <ng-template let-car="rowData" pTemplate="body">
            <button type="button" pButton label="修改"></button>
          </ng-template>
        </p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
    </div>
    <div class="Operationlog" *ngSwitchCase="3">
      <div class="mysearch">
        <form>
          <div class="ui-g">

            <div class="ui-g-12 ui-sm-12">
              <div class="ui-g-6 ui-sm-12 option">
                <!--<button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>-->
                <button pButton  label="添加" ngClass="ui-sm-12"  (click)="showRoomstationsEdit()"></button>
                <button pButton  label="删除" ngClass="ui-sm-12"  (click)="clearSearch()"></button>
              </div>
            </div>

          </div>
        </form>
      </div>
      <p-dataTable [value]="strategies">
        <p-column selectionMode="multiple"></p-column>
        <p-column field="one" header="策略名"></p-column>
        <p-column field="two" header="是否启用"></p-column>
        <p-column field="three" header="告警方式"></p-column>
        <p-column styleClass="col-button" header="操作">
          <ng-template let-car="rowData" pTemplate="body">
            <button type="button" pButton label="修改"></button>
          </ng-template>
        </p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
    </div>
  </ng-container>
</div>

<!-- 编辑基站弹框 -->
<app-basestation-edit [currentBase]="selectBase" [state]="baseState" (closeBaseEdit)="closeBaseEdit($event)" (addBase)="addBasestation($event)" (updateBase)="updateBasestation($event)" *ngIf="baseEditMask"></app-basestation-edit>

<!-- 基站分组弹框 -->
<app-basestation-group (closeBaseGroup)="closeBaseGroup($event)" *ngIf="baseGroupMask"></app-basestation-group>

<!-- 添加基站分组到机房 -->
<app-roomstations-edit (closeRoomstationsEdit)="closeRoomstationsEdit($event)" *ngIf="roomstationsEditMask"></app-roomstations-edit>
